package com.niodata.dp.web.module.app;

import com.niodata.dp.app.AppInfo;
import java.util.ArrayList;
import java.util.List;

public class AppNamePair {

  private String name;
  private String appId;

  public static List<AppNamePair> build(List<AppInfo> appInfoList) {
    List<AppNamePair> appNamePairList = new ArrayList<AppNamePair>(appInfoList.size());
    for (AppInfo appInfo : appInfoList) {
      AppNamePair pair = new AppNamePair();
      pair.setName(appInfo.getName());
      pair.appId = appInfo.getAppId();
      appNamePairList.add(pair);
    }

    return appNamePairList;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public String getAppId() {
    return appId;
  }

  public void setAppId(String appId) {
    this.appId = appId;
  }
}
